package lab02.test12;

//矩形

public class Rectangular extends Shape {

    //属性：长，宽

    double length,width;

    //行为：赋值，面积，周长

    Rectangular(double x,double y){

        length=x;
        width=y;
    }


    @Override
    double area() {
        return length*width;
    }

    @Override
    double perimeter() {
        return (length+width)*2;
    }

}
